<div class="linebox">
 
  <div :id="id" style="width:100%; height:100%;" ref="Echart"></div>
   
  </div>
   
   
   
  methods: {
   
      init(){
   
      const self = this;//因为箭头函数会改变this指向，指向windows。所以先把this保存
   
      setTimeout(() => {
   
          window.addEventListener('resize', function() {
   
               self.chart = self.$echarts.init(self.$refs.Echart);
   
                self.chart.resize();
   
          })
   
        },10)
   
      }
   
  }